EMT Practice Test

1. Question Content...


Question List

Question1: A custom Visualforce controller calls the apexPages.addMessage () method, but no messages are rendering on the page.
Which component should be added to the Visualforce page to display the message?

Question2: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.
Which Visualforce feature supports this requirement?

Question3: Which scenario is valid for execution by unit tests?

Question4: Which two actions may cause triggers to fire?
Choose 2 answers

Question5: A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.
What is the correct implementation?

Question6: While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.
Which approach should the developer use to be sure that the Apex class is working according to specifications?

Question7: A developer Is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.
Which design framework should the developer consider to ensure scalability and maintainability?

Question8: Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

Question9: A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers

Question10: A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.
What should a developer do to allow their code to move some existing Orderltem records to a new Order record?

Question11: Which code displays the contents of a Visualforce page as a PDF?

Question12: A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?

Question13: Which two operations affect the number of times a trigger can fire?
Choose 2 answers

Question14: A business has a proprietary Order Management System (QMS) that creates orders from Its website and fulfills the orders. When the order Is created in the OMS, an integration also creates an order record In Salesforce and relates It to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.
The business notices that each update from the OMS creates a new order record in Salesforce.
Which two actions should prevent the duplicate order records from being created in Salesforce?

Question15: Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

Question16: What are two benefits of using External IDs? Choose 2 answers

Question17: Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.
What is the best solution to assign the case to the appropriate support representative?

Question18: The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

Question19: Which code in a Visualforce page and/or controller might present a security vulnerability?

Question20: Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers

Question21: What should a developer use to script the deployment and unit test execution as part of continuous integration?

Question22: Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen.
What should a developer use to satisfy this requirement?

Question23: An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update must the developer make in the flow?

Question24: A custom picklist field, Food _Preference_ c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated every time a record is created or updated.
What is the optimal way to ensure a value is selected every time a record is saved?

Question25: Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?

Question26: A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?

Question27: team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.
Which type of Salesforce orgs should they use for their development?

Question28: A developer wants to send an outbound message when a record meets a specific criteria.
Which two features satisfy this use case?
Choose 2 answers

Question29: A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.
Which tool should the developer use to troubleshoot query performance?

Question30: How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

Question31: A developer considers the following snippet of code:

Based on this code, what is the value of %?

Question32: A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality.
What should the developer use to satisfy this requirement in the most efficient manner?

Question33: A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names.
What two things should be done to create the test data within the unit test with the least amount of code?
Choose 2 answers

Question34: A developer needs to allow users to complete a form on an Account record that will create record for a custom object.
The form needs to display different fields depending on the user's job role. The functionality should only be available to a small group of users.
Which three things should the developer do to satisfy these requirements?
Choose 3 answers

Question35: A lead developer creates an Apex interface called Laptop.
Consider the following code snippet:

How can a developer use the Laptop Interface within the silverzaptop class?

Question36: What is an example of a polymorphic lookup field in Salesforce?

Question37: A developer is alerted to an Issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?

Question38: Which exception type cannot be caught ?

Question39: Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts. The component should be able to validate the user input before saving the information to the database.
What is the best technology to create this component?

Question40: A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended?

Question41: The Job_application_ c custom object has a field that is a master-detail relationship to the Contact object, where the Contact object is the master.
As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology', while also retrieving the Contact's Job_Application__c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of Contacts?

Question42: A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?

Question43: A developer creates a custom exception as shown below:
public class ParityException extends Exception. {}
What are two ways the developer can fire the exception in Apex? Choose 2 answers

Question44: Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.
What would be the best solution for this requirement?

Question45: developer must provide custom user interfaces when users edit a Contact either Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact's Edit button and provide this functionality?

Question46: A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?

Question47: Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?

Question48: Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?

Question49: A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.
What is the correct definition of the Apex method?

Question50: A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__c custom field.
What should the developer use, along with a lightning-record-edit-form, so that salarv < field functions as a currency Input and is only viewable and editable by users that have the correct field level permissions on salary _c?

Question51: What are three ways for a developer to execute tests in an org?
Choose 3 answers

Question52: While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Question53: A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunitylLineltem trigger.
Which method allows access to the price book?

Question54: Universal Containers decides to use exclusively declarative development to build out a new Salesforce application.
Which three options should be used to build out the database layer for the application?
Choose 3 answers

Question55: A custom object Trainer_ < has a lookup field to another custom object cym__ c.
Which SOQL query will get the record for the Viridian City Gym and all it's trainers?

Question56: A developer has an integer variable called maxattempts. The developer needs to ensure that once maxattempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions.
How should the developer declare mazattempts to meet these requirements?

Question57: Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation.
What are two characteristics of declarative development over programmatic customization?
Choose 2 answers

Question58: What are two benefits of using declarative customizations over code? Choose 2 answers Choose 2 answers

Question59: Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

Question60: A Primaryid__c custom field exists on the candidate_ c custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.
As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?

Question61: What Is the result of the following code?

Question62: A developer must perform a complex SOQL query that joins two objects in a Lightning component.
How can the Lightning component execute the query?

Question63: What are two considerations for deploying from a sandbox to production? Choose 2 answers

Question64: A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?

Question65: Which two are phases in the Aura application event propagation framework?
Choose 2 answers

Question66: A developer deployed a trigger to update the status__c of Assets related to an Account when the Account's status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?

Question67: Assuming that name is a String obtained by an <apex:inpucText> tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection? Choose 2 answers

Question68: A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?

Question69: What should a developer use to fix a Lightning web component bug in a sandbox?

Question70: How many Accounts will be inserted by the following block of code?

Question71: What are three characteristics of change set deployments?
Choose 3 answers

Question72: Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers

Question73: What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers"?

Question74: A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.

Which is the correct implementation?

Question75: Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own.
What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?

Question76: A developer must implement a checkpaymentpbrocaessox class that provides check processing payment capabilities that adhere to what is defined for payments in the paymentProcsssor Interface.

Which implementation is correct to use the paymenterocesscr interface class?

Question77: A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?

Question78: What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface?
Choose 2 answers

Question79: In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?
Choose 2 answers